{include file='common/_meta' /}
<body>
<div class="container">
    <form class="layui-form" action="" lay-filter="formTest" id="form-article">
        <div class="layui-form layui-form-pane">
            <div class="layui-col-sm12">
                <div class="layui-form-item">
                    <label class="layui-form-label">审核描述</label>
                    <div class="layui-input-block">
                        <textarea name="desc" id="desc" placeholder="请输入" class="layui-textarea"></textarea>
                    </div>
                </div>
            </div>

            <div class="layui-col-sm12">
                <div class="layui-form-item">
                    <label class="layui-form-label">审核状态</label>
                    <div class="layui-input-block">
                        <select name="status" id="status" lay-search>
                            <option value="1">通过</option>
                            <option value="2">失败</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <input type="hidden" name="reviewId" />
                    <input type="hidden" name="st" />
                    <button class="layui-btn" lay-submit lay-filter="formDemo">提交</button>
                </div>
            </div>
        </div>
    </form>

</div>
{include file="common/_footer"}

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
layui.use('form', function() {

    var layer = layui.layer;
    var form  = layui.form;
    form.val("formTest", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值
        "reviewId": "{$reviewId}",
        "st": "{$st}",
    });
    //监听提交
    form.on('submit(formDemo)', function(data) {

        $.ajax({
            type : "POST",
            url  : "{:url('SmsReview/reviewSms')}",
            data : $("#form-article").serialize(),
            success : function(json) {

                if (json.code == 200) {

                    layer.msg(json.msg, {icon:1,time:1000}, function(){layer.open({type: 3});parent.location.reload()});
                } else {

                    layer.msg(json.msg, {icon: 5,time:3000});
                }

            },
            error : function(json) {

                layer.msg('失败', {icon: 5,time:3000});
            }
        });

        return false;
    });

});
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>